import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import p001 from './p001';

export default async function a001(fd: IFeidaoAiBrowserComponent, no: string, hno: string) {// 显示修改记录弹窗
	// todo
	console.log('zj-000010:a001----start');
	// 显示设置特性关联窗口
	fd.data.node.style.display = 'block';
	const n = fd.data.node.querySelector<HTMLDivElement>('[data-id="record"]');
	set_node_cls(n, 'display-n', false);
	set(fd, 'source2', no);// 保存隐患源编号
	set(fd, 'hsource1', hno);// 保存选中列的特性隐患源编号
	console.log('zj00010保存隐患源编号', no);
	console.log('zj00010保存选中列的特性隐患源编号', hno);
	const res = await nodejs<{ data: Array<{}>, c: number }>('wyf-hManager/zj-000010/s001', {
		hidden_source: no,
		hidden_source_feature_no: hno,
		pn: 1
	});
	console.log(res);
	render(fd, res, p001, 'p001', 'inner');
	console.log('zj-000010:a001----end');
}
